package com.hs.security.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hs.security.mapper.TbPermissionMapper;
import com.hs.security.pojo.TbPermission;
import com.hs.security.service.TbPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 郭敖
 * @since 2023-08-18
 */
@Service
public class TbPermissionServiceImpl extends ServiceImpl<TbPermissionMapper, TbPermission> implements TbPermissionService {
    @Autowired
    private TbPermissionMapper mapper;


    @Override
    public List<TbPermission> findAll() {
        return mapper.selectList(null);
    }

    @Override
    public Page<TbPermission> findByPage(Integer pageNum, Integer pageSize) {
        Page<TbPermission> page = new Page<>();
        return mapper.selectPage(page, null);
    }
}
